#include "../drivers/7segments.h"
#include "../drivers/clock.h"
#include "../drivers/UART.h"


int main()
{
	startUpUART();
	writeNumberToSegments(0);
	char curChar = '0';
	do
	{
		while(!UARTreceivedData());
		curChar = UARTreceiveByte();
		if(curChar == '1')
			writeNumberToSegments(0x78);
		else
			writeNumberToSegments(0);	
	}while(curChar != '!');
	return 1;	
}
